"""
求矩阵的局部极大值
"""
m, n = input().split()
m, n = int(m), int(n)
list1 = []
f = True
for i in range(m):
    list1.append(list(map(int, input().split())))
for i in range(1, m - 1):
    for j in range(1, n - 1):
        if (list1[i][j] <= list1[i-1][j]) or (list1[i][j] <= list1[i+1][j]) or (list1[i][j] <= list1[i][j-1]) or (list1[i][j] <= list1[i][j+1]):
            continue
        else:
            f = False
            print(f'{list1[i][j]} {i+1} {j+1}')
if f:
    print(f'None {m} {n}')